import 'package:flutter/material.dart';

List datas = [
  {'id': 123, 'name': "lee"},
  {'id': 456, 'name': "wang"},
  {'id': 789, 'name': "zhou"},
];

class Demo4ListPage extends StatefulWidget {
  final arguments;

  Demo4ListPage({Key? key, this.arguments = '没有传递数据'}) : super(key: key);

  @override
  _Demo4ListPageState createState() => _Demo4ListPageState();
}

class _Demo4ListPageState extends State<Demo4ListPage> {
  @override
  Widget build(BuildContext context) {
    print('message消息:${widget.arguments}');
    return MaterialApp(
      theme: ThemeData(primaryColor: Colors.greenAccent),
      home: Scaffold(
        body: ListView.builder(
          itemBuilder: (context, index) {
            return ListTile(
              title: Text(datas[index]['name']),
            );
          },
          itemCount: datas.length,
        ),
      ),
    );
  }
}


